<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <div id="box">
       

    </div>
    
    <script src="./js/react.js"></script>
    <script src="./js/react-dom.js"></script>
    <script src="./js/babel.min.js"></script>

    <!-- script 的type=text/babel -->

    <script type="text/babel">
        // ReactDOM.render(
        //     <h1>hello</h1>,
        //     document.getElementById("box")
        // );


        const h = <h1>hello</h1>;
        console.log("h",h);

        // ReactDOM.render()：把jsx渲染到容器里;
        ReactDOM.render(
            h,
            document.getElementById("box")
        );
        
    </script>
</body>
</html>
